<template>
  <div style="width: 45%; margin: 0px auto">
    <el-card class="box-card" style="text-align: center">
      <div slot="header" class="clearfix" style="text-align: center">
  <span style="color: black;
                    font-size: 30px;
                    font-weight: 800;
                    font-family: 华文仿宋;">
                    症状描述
                </span>
      </div>
      <el-input
          type="textarea"
          :rows="5"
          placeholder="请输入内容"
          v-model="symptom"
          maxlength="200"
          show-word-limit style="margin-top: 10px;margin-bottom: 10px"
      >
      </el-input>
      <el-button type="primary" round @click="startup">保存</el-button>
    </el-card>
  </div>
</template>

<script>
import bus from "@/api/index/bus.js";

export default {
  name: "SymptomDescription",
  data() {
    return {
      symptom: "",
    }
  },
  mounted() {
// 事件监听 并给Bus实例初始化一个属性
    bus.$on('question', args => {
      bus.sendData = args
    })
  },
  methods: {
    startup() {
      this.$root.$emit("stepvalue", 3);//点击保存后，跳转到症状描述
      console.log(this.symptom)
      bus.$emit('question', this.symptom);
      // this.$root.$emit("symptom", this.symptom);
    }
    ,
  }
}
</script>

<style scoped>


.box-card /deep/ .el-card__header {
  height: 76px;
}

</style>
